//
//  UIView + Frame.swift
//  Edaixi-iOS
//
//  Created by 刘树华 on 2017/12/1.
//  Copyright © 2017年 刘树华. All rights reserved.
//

import Foundation
import UIKit
extension UIView {
    
    var x : CGFloat {
        set{
          frame.origin.x = newValue
        }
        get{
          return frame.origin.x
        }
        
    }
    var y : CGFloat {
        set{
            frame.origin.y = newValue
        }
        get{
           return frame.origin.y
        }
        
    }
    var centerX : CGFloat {
        set{
            center.x = newValue
        }
        get {
           return center.x
        }
        
    }
    var centerY : CGFloat {
        
        set{
            center.y = newValue
        }
        get {
            return center.y
        }
    }
    var width : CGFloat {
        set{
           frame.size.width = newValue
        }
        get{
           return frame.size.width
        }
        
    }
    var height : CGFloat {
        set{
            frame.size.height = newValue
        }
        get{
            return frame.size.height
        }
        
    }
    
    var size : CGSize {
        set{
            frame.size = newValue
        }
        get{
            return frame.size
        }
        
    }
    
    var bottomY : CGFloat {
        return frame.maxY
    }
    var rightX : CGFloat {
        return frame.maxX
    }
  
}
